原贴地址：[http://blog.leanote.com/post/dawnmagnet/lc剑指 Offer 
37](http://blog.leanote.com/post/dawnmagnet/lc-offer37)
# 题目
<p>请实现两个函数，分别用来序列化和反序列化二叉树。</p>
<p>你需要设计一个算法来实现二叉树的序列化与反序列化。这里不限定你的序列 / 
反序列化算法执行逻辑，你只需要保证一个二叉树可以被序列化为一个字符串并且将这个
字符串反序列化为原始的树结构。</p>
<p><strong>提示：</strong>输入输出格式与 LeetCode 
目前使用的方式一致，详情请参阅&nbsp;<a href="/faq/#binary-tree">LeetCode 
序列化二叉树的格式</a>。你并非必须采取这种方式，你也可以采用其他的方法解决这个
问题。</p>
<p>&nbsp;</p>
<p><strong>示例：</strong></p>
<img style="width: 442px; height: 324px;" 
src="https://assets.leetcode.com/uploads/2020/09/15/serdeser.jpg" alt="">
<pre><strong>输入：</strong>root = [1,2,3,null,null,4,5]
<strong>输出：</strong>[1,2,3,null,null,4,5]
</pre>
<p>&nbsp;</p>
<p>注意：本题与主站 297 题相同：<a 
href="https://leetcode-cn.com/problems/serialize-and-deserialize-binary-tree/">
https://leetcode-cn.com/problems/serialize-and-deserialize-binary-tree/</a></p>
# 思路分析
# C++代码